home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 August: Tool Chest / Dev.CD Aug 94.toast / Tool Chest / Games / Game Sample Code / SpriteWorld 1.0b3 / Sources / BlitPixie.c next >
Encoding:
Text File  |  1993-06-07  |  16.1 KB  |  590 lines  |  [TEXT/KAHL]

  1. ///--------------------------------------------------------------------------------------
  2. //    BlitPixie.c
  3. //
  4. //    Created:    Thursday, September 24, 1992 at 11:48 PM
  5. //    By:        Tony Myles
  6. //
  7. //    Pieced together by Tony Myles and Ben Sharpe
  8. //    Special thanks to Brigham Stevens and Sean Callahan
  9. //
  10. //    Portions Copyright: © 1991-93 Tony Myles, All rights reserved worldwide.
  11. //    Portions Copyright: © 1993 Ben Sharpe, All rights reserved worldwide.
  12. ///--------------------------------------------------------------------------------------
  13.  
  14.  
  15. #ifndef __QUICKDRAW__
  16. #include <Quickdraw.h>
  17. #endif
  18.  
  19. #ifndef __QDOFFSCREEN__
  20. #include <QDOffscreen.h>
  21. #endif
  22.  
  23. #ifndef __FRAME__
  24. #include <Frame.h>
  25. #endif
  26.  
  27. #ifndef __BLITPIXIE__
  28. #include <BlitPixie.h>
  29. #endif
  30.  
  31.  
  32. #define __UseCClipRect__
  33.  
  34.  
  35. ///--------------------------------------------------------------------------------------
  36. //    BlitPixie
  37. //
  38. //    copies the pixels from within pixRect from srcPixMapH to dstPixMapH
  39. //
  40. //    assumes 8 bits per pixel
  41. //    assumes pixmaps are the same size
  42. //    assumes pixmaps are locked
  43. //    assumes pixRect is long word aligned
  44. // assumes sourceRect and destRect are equalsize
  45. //
  46. ///--------------------------------------------------------------------------------------
  47.  
  48. void BlitPixie(
  49.     PixMapPtr sourceImage,
  50.     PixMapPtr destImage, 
  51.     Rect *sourceRect,
  52.     Rect *destRect,
  53.     Rect *boundsRect)
  54. {
  55.     
  56.     register long *sourceMemPtr;                // pointer to source image memory
  57.     register long *destMemPtr;                    // pointer to dest image memory
  58.     register long numRowsToCopy;                // rows we are going to copy
  59.     register long sourceRowLongsOffset;        // rowBytes offset
  60.     register long destRowLongsOffset;        // rowBytes offset
  61.     register long loop2Offset;                    // jump offset for partial inner loop
  62.     register long loopsPerRow;                    // number of full inner loops to do
  63.  
  64.     long sourceStripRowBytes;                    // to clear high bit of rowbytes
  65.     long destStripRowBytes;                        // to clear high bit of rowbytes
  66.     long numRowLongs;                                // number of long words per row
  67.     Rect blitRect;                                    // area to blit from
  68.     Rect dstBlitRect;
  69.     char mmuMode;                                    // 32-bit mode required
  70.  
  71.         // make a local copy so we can make some adjustments
  72.     blitRect = *sourceRect;
  73.     dstBlitRect = *destRect;
  74.     
  75. #ifndef __UseCClipRect__
  76.     asm 
  77.     {
  78.         lea        blitRect,         a0
  79.         lea        dstBlitRect,    a1
  80.         movea.L    boundsRect,     a2
  81.         
  82. tstT:    move.w    Rect.top(a1),d0
  83.         cmp.w        Rect.top(a2),d0
  84.         bge        @tstB
  85.         move.w    Rect.top(a2),d0
  86.         sub.w        Rect.top(a1),d0
  87.         add.w        d0,Rect.top(a0)
  88.         move.w    Rect.top(a2),Rect.top(a1)
  89.         move.w    Rect.top(a1),d0
  90.         cmp.w        Rect.bottom(a1),d0
  91.         bge        @EndBlit
  92.         bra        @tstL
  93.  
  94. tstB:    move.w    Rect.bottom(a1),d0
  95.         cmp.w        Rect.bottom(a2),d0
  96.         ble        @tstL
  97.         move.w    Rect.bottom(a2),Rect.bottom(a1)
  98.         move.w    Rect.bottom(a1),d0
  99.         cmp.w        Rect.top(a1),d0
  100.         ble        @EndBlit
  101.         
  102. tstL:    move.w    Rect.left(a1),d0
  103.         cmp.w        Rect.left(a2),d0
  104.         bge        @tstR
  105.         move.w    Rect.left(a2),d0
  106.         sub.w        Rect.left(a1),d0
  107.         add.w        d0,Rect.left(a0)
  108.         move.w    Rect.left(a2),Rect.left(a1)
  109.         move.w    Rect.left(a1),d0
  110.         cmp.w        Rect.right(a1),d0
  111.         bge        @EndBlit
  112.         bra        @doneClip
  113.         
  114. tstR:    move.w    Rect.right(a1),d0
  115.         cmp.w        Rect.right(a2),d0
  116.         ble        @doneClip
  117.         move.w    Rect.right(a2),Rect.right(a1)
  118.         move.w    Rect.right(a1),d0
  119.         cmp.w        Rect.left(a1),d0
  120.         ble        @EndBlit
  121.         
  122. doneClip:
  123.     }
  124. #else
  125.  
  126.         // clip off the top so we dont write into random memory
  127.     if (dstBlitRect.top < boundsRect->top)
  128.     {
  129.         blitRect.top += boundsRect->top - dstBlitRect.top;
  130.         dstBlitRect.top = boundsRect->top;
  131.         if (dstBlitRect.top >= dstBlitRect.bottom) return;    
  132.     }
  133.         // clip off the bottom so we dont write into random memory
  134.     else if (dstBlitRect.bottom > boundsRect->bottom)
  135.     {
  136.         dstBlitRect.bottom = boundsRect->bottom;
  137.         if (dstBlitRect.bottom <= dstBlitRect.top) return;
  138.     }
  139.  
  140.         // clip off the left so we dont write into random memory
  141.     if (dstBlitRect.left < boundsRect->left)
  142.     {
  143.         blitRect.left += boundsRect->left - dstBlitRect.left;
  144.         dstBlitRect.left = boundsRect->left;
  145.  
  146.         if (dstBlitRect.left >= dstBlitRect.right) return;
  147.     }
  148.         // clip off the right so we dont write into random memory
  149.     else if (dstBlitRect.right > boundsRect->right)
  150.     {
  151.         dstBlitRect.right = boundsRect->right;
  152.  
  153.         if (dstBlitRect.right <= dstBlitRect.left) return;
  154.     }
  155. #endif
  156.  
  157.         // high bit of pixMap rowBytes must be cleared
  158.     sourceStripRowBytes = sourceImage->rowBytes & 0x7FFF;
  159.  
  160.         // high bit of pixMap rowBytes must be cleared
  161.     destStripRowBytes = destImage->rowBytes & 0x7FFF;
  162. /*
  163.         // calculate the address of the first byte of the source
  164.     sourceMemPtr = (long *)(GetPixBaseAddr(&sourceImage) + 
  165.         (sourceStripRowBytes * blitRect.top) + blitRect.left);
  166.  
  167.         // calculate the address of the first byte of the destination
  168.     destMemPtr = (long *)(GetPixBaseAddr(&destImage) + 
  169.         (destStripRowBytes * dstBlitRect.top) + dstBlitRect.left);
  170. */
  171.         // calculate the address of the first byte of the source
  172.     sourceMemPtr = (long *)(sourceImage->baseAddr + 
  173.         (sourceStripRowBytes * blitRect.top) + blitRect.left);
  174.  
  175.         // calculate the address of the first byte of the destination
  176.     destMemPtr = (long *)(destImage->baseAddr + 
  177.         (destStripRowBytes * dstBlitRect.top) + dstBlitRect.left);
  178.  
  179.         // calculate the number of rows to copy
  180.     numRowsToCopy = dstBlitRect.bottom - dstBlitRect.top;
  181.  
  182.         // calculate the number of long words in a row
  183.     numRowLongs = (dstBlitRect.right - dstBlitRect.left) >> 2;
  184.  
  185.         // calculate the long word offset from the end of one row to the start of the next
  186.     sourceRowLongsOffset = ((sourceStripRowBytes >> 2) - numRowLongs) << 2;
  187.  
  188.         // calculate the long word offset from the end of one row to the start of the next
  189.     destRowLongsOffset = ((destStripRowBytes >> 2)  - numRowLongs) << 2;
  190.  
  191.     loopsPerRow = numRowLongs >> 4;
  192.     loop2Offset = (16 - (numRowLongs - (loopsPerRow << 4))) << 1;
  193.         
  194.         // change to 32-bit addressing mode to access video memory
  195.         // the previous addressing mode is returned in mmuMode for restoring later
  196.     mmuMode = true32b;
  197.     SwapMMUMode(&mmuMode);
  198.  
  199.     asm {
  200.             
  201.     loop1:
  202.         move.L    loopsPerRow,d0
  203.         loop2:
  204.             bne        @1
  205.             jmp        @1(loop2Offset)
  206.     @1:    
  207.             move.L    (sourceMemPtr)+,(destMemPtr)+ ; 16
  208.             move.L    (sourceMemPtr)+,(destMemPtr)+ ; 15
  209.             move.L    (sourceMemPtr)+,(destMemPtr)+ ; 14
  210.             move.L    (sourceMemPtr)+,(destMemPtr)+ ; 13
  211.             move.L    (sourceMemPtr)+,(destMemPtr)+ ; 12
  212.             move.L    (sourceMemPtr)+,(destMemPtr)+ ; 11 
  213.             move.L    (sourceMemPtr)+,(destMemPtr)+ ; 10
  214.             move.L    (sourceMemPtr)+,(destMemPtr)+ ;  9
  215.             move.L    (sourceMemPtr)+,(destMemPtr)+ ;  8
  216.             move.L    (sourceMemPtr)+,(destMemPtr)+ ;  7
  217.             move.L    (sourceMemPtr)+,(destMemPtr)+ ;  6
  218.             move.L    (sourceMemPtr)+,(destMemPtr)+ ;  5
  219.             move.L    (sourceMemPtr)+,(destMemPtr)+ ;  4
  220.             move.L    (sourceMemPtr)+,(destMemPtr)+ ;  3
  221.             move.L    (sourceMemPtr)+,(destMemPtr)+ ;  2
  222.             move.L    (sourceMemPtr)+,(destMemPtr)+ ;  1
  223.  
  224.             subq.L        #1,d0
  225.             bpl            @loop2
  226.         endloop2:
  227.  
  228.         adda.L    sourceRowLongsOffset,sourceMemPtr
  229.         adda.L    destRowLongsOffset,destMemPtr
  230.         subq.L    #1,numRowsToCopy
  231.         bne        @loop1
  232.     endloop1:
  233.     }
  234.  
  235.         // restore addressing mode back to what it was
  236.     SwapMMUMode(&mmuMode);
  237.     asm 
  238.     {
  239. @EndBlit:
  240.     }
  241. }
  242.  
  243.  
  244.  
  245. ///--------------------------------------------------------------------------------------
  246. //    BlitPixieMask
  247. //
  248. //    assumes 8 bits per pixel
  249. //    assumes pixmaps are the same size
  250. //    assumes pixmaps are locked
  251. //    assumes pixRect is long word aligned
  252. // assumes sourceRect and destRect are equalsize
  253. ///--------------------------------------------------------------------------------------
  254.  
  255. void BlitPixieMask(
  256.     PixMapPtr maskImage,
  257.     PixMapPtr sourceImage,
  258.     PixMapPtr destImage, 
  259.     Rect *sourceRect,
  260.     Rect *destRect,
  261.     Rect *boundsRect)
  262. {
  263.     register long *sourceMemPtr;                // pointer to source memory
  264.     register long *maskMemPtr;                    // pointer to mask memory
  265.     register long *destMemPtr;                    // pointer to dest memory
  266.     register long numRowsToCopy;                // rows we are going to copy
  267.     register long sourceRowLongsOffset;        // rowBytes converted to long
  268.     register long destRowLongsOffset;        // rowBytes converted to long
  269.     register long loop2Offset;
  270.     register long loopsPerRow;
  271.  
  272.     long sourceStripRowBytes;                        // to clear high bit of rowbytes
  273.     long destStripRowBytes;                        // to clear high bit of rowbytes
  274.     long numRowLongs;                                // number of long words per row
  275.     Rect blitRect;                                    // area to blit from
  276.     Rect dstBlitRect;                                // area to blit from and to
  277.     char mmuMode;                                    // 32-bit mode required
  278.  
  279.         // make a local copy so we can make some adjustments
  280.     blitRect = *sourceRect;
  281.     dstBlitRect = *destRect;
  282.  
  283. #ifndef __UseCClipRect__
  284.     asm 
  285.     {
  286.         lea        blitRect,         a0
  287.         lea        dstBlitRect,    a1
  288.         movea.L    boundsRect,     a2
  289.         
  290. tstT:    move.w    (a1),d0
  291.         cmp.w        (a2),d0
  292.         bge        @tstB
  293.         move.w    (a2),d0
  294.         sub.w        (a1),d0
  295.         add.w        d0,(a0)
  296.         move.w    (a2),(a1)
  297.         move.w    (a1),d0
  298.         cmp.w        Rect.bottom(a1),d0
  299.         bge        @EndBlit
  300.         bra        @tstL
  301.  
  302. tstB:    move.w    Rect.bottom(a1),d0
  303.         cmp.w        Rect.bottom(a2),d0
  304.         ble        @tstL
  305.         move.w    Rect.bottom(a2),Rect.bottom(a1)
  306.         move.w    Rect.bottom(a1),d0
  307.         cmp.w        (a1),d0
  308.         ble        @EndBlit
  309.         
  310. tstL:    move.w    Rect.left(a1),d0
  311.         cmp.w        Rect.left(a2),d0
  312.         bge        @tstR
  313.         move.w    Rect.left(a2),d0
  314.         sub.w        Rect.left(a1),d0
  315.         add.w        d0,Rect.left(a0)
  316.         move.w    Rect.left(a2),Rect.left(a1)
  317.         move.w    Rect.left(a1),d0
  318.         cmp.w        Rect.right(a1),d0
  319.         bge        @EndBlit
  320.         bra        @doneClip
  321.         
  322. tstR:    move.w    Rect.right(a1),d0
  323.         cmp.w        Rect.right(a2),d0
  324.         ble        @doneClip
  325.         move.w    Rect.right(a2),Rect.right(a1)
  326.         move.w    Rect.right(a1),d0
  327.         cmp.w        Rect.left(a1),d0
  328.         ble        @EndBlit
  329.         
  330. doneClip:
  331.     }
  332. #else
  333.  
  334.         // clip off the top so we dont write into random memory
  335.     if (dstBlitRect.top < boundsRect->top)
  336.     {
  337.         blitRect.top += boundsRect->top - dstBlitRect.top;
  338.         dstBlitRect.top = boundsRect->top;
  339.         if (dstBlitRect.top >= dstBlitRect.bottom) return;    
  340.     }
  341.         // clip off the bottom so we dont write into random memory
  342.     else if (dstBlitRect.bottom > boundsRect->bottom)
  343.     {
  344.         dstBlitRect.bottom = boundsRect->bottom;
  345.         if (dstBlitRect.bottom <= dstBlitRect.top) return;
  346.     }
  347.  
  348.         // clip off the left so we dont write into random memory
  349.     if (dstBlitRect.left < boundsRect->left)
  350.     {
  351.         blitRect.left += boundsRect->left - dstBlitRect.left;
  352.         dstBlitRect.left = boundsRect->left;
  353.  
  354.         if (dstBlitRect.left >= dstBlitRect.right) return;
  355.     }
  356.         // clip off the right so we dont write into random memory
  357.     else if (dstBlitRect.right > boundsRect->right)
  358.     {
  359.         dstBlitRect.right = boundsRect->right;
  360.  
  361.         if (dstBlitRect.right <= dstBlitRect.left) return;
  362.     }
  363. #endif
  364.  
  365.         // high bit of pixMap rowBytes must be cleared
  366.     sourceStripRowBytes = sourceImage->rowBytes & 0x7FFF;
  367.  
  368.         // high bit of pixMap rowBytes must be cleared
  369.     destStripRowBytes = destImage->rowBytes & 0x7FFF;
  370. /*
  371.         // calculate the address of the first byte of the source
  372.     sourceMemPtr  = (long *)(GetPixBaseAddr(&sourceImage) + (sourceStripRowBytes * blitRect.top) + blitRect.left);
  373.  
  374.         // calculate the address of the first byte of the mask
  375.     maskMemPtr = (long *)(GetPixBaseAddr(&maskImage) + (sourceStripRowBytes * blitRect.top) + blitRect.left);
  376.  
  377.     blitRect = dstBlitRect; // for speed 
  378.     
  379.         // calculate the address of the first byte of the destination
  380.     destMemPtr  = (long *)(GetPixBaseAddr(&destImage) + (destStripRowBytes * blitRect.top) + blitRect.left);
  381. */
  382.         // calculate the address of the first byte of the source
  383.     sourceMemPtr = (long *)(sourceImage->baseAddr + 
  384.         (sourceStripRowBytes * blitRect.top) + blitRect.left);
  385.  
  386.         // calculate the address of the first byte of the mask
  387.     maskMemPtr = (long *)(maskImage->baseAddr +
  388.         (sourceStripRowBytes * blitRect.top) + blitRect.left);
  389.  
  390.     blitRect = dstBlitRect; // for speed 
  391.  
  392.         // calculate the address of the first byte of the destination
  393.     destMemPtr = (long *)(destImage->baseAddr + 
  394.         (destStripRowBytes * dstBlitRect.top) + dstBlitRect.left);
  395.  
  396.         // calculate the number of rows to copy
  397.     numRowsToCopy = blitRect.bottom - blitRect.top;
  398.  
  399.         // calculate the number of long words in a row
  400.     numRowLongs = (dstBlitRect.right - dstBlitRect.left) >> 2;
  401.  
  402.         // calculate the long word offset from the end of one row to the start of the next
  403.     sourceRowLongsOffset = ((sourceStripRowBytes >> 2) - numRowLongs) << 2;
  404.  
  405.         // calculate the long word offset from the end of one row to the start of the next
  406.     destRowLongsOffset = ((destStripRowBytes >> 2)  - numRowLongs) << 2;
  407.  
  408.     loopsPerRow = numRowLongs >> 4;
  409.     loop2Offset = (16 - (numRowLongs - (loopsPerRow << 4))) * 12;
  410.  
  411.         // change to 32-bit addressing mode to access video memory
  412.         // the previous addressing mode is returned in mmuMode for restoring later
  413.     mmuMode = true32b;
  414.     SwapMMUMode(&mmuMode);
  415.     asm {
  416.         
  417.     loop1:
  418.         move.L    loopsPerRow,d2
  419.         loop2:
  420.             bne        @1
  421.             jmp        @1(loop2Offset)
  422.         @1:
  423.         // 16
  424.             move.L        (destMemPtr),d1
  425.             move.L        (sourceMemPtr)+,d0
  426.             eor.L         d1,d0
  427.             and.L         (maskMemPtr)+,d0
  428.             eor.L         d1,d0
  429.             move.L        d0,(destMemPtr)+
  430.         // 15
  431.             move.L        (destMemPtr),d1
  432.             move.L        (sourceMemPtr)+,d0
  433.             eor.L         d1,d0
  434.             and.L         (maskMemPtr)+,d0
  435.             eor.L         d1,d0
  436.             move.L        d0,(destMemPtr)+
  437.        // 14
  438.             move.L        (destMemPtr),d1
  439.             move.L        (sourceMemPtr)+,d0
  440.             eor.L         d1,d0
  441.             and.L         (maskMemPtr)+,d0
  442.             eor.L         d1,d0
  443.             move.L        d0,(destMemPtr)+
  444.       // 13
  445.             move.L        (destMemPtr),d1
  446.             move.L        (sourceMemPtr)+,d0
  447.             eor.L         d1,d0
  448.             and.L         (maskMemPtr)+,d0
  449.             eor.L         d1,d0
  450.             move.L        d0,(destMemPtr)+
  451.       // 12
  452.             move.L        (destMemPtr),d1
  453.             move.L        (sourceMemPtr)+,d0
  454.             eor.L         d1,d0
  455.             and.L         (maskMemPtr)+,d0
  456.             eor.L         d1,d0
  457.             move.L        d0,(destMemPtr)+
  458.       // 11
  459.             move.L        (destMemPtr),d1
  460.             move.L        (sourceMemPtr)+,d0
  461.             eor.L         d1,d0
  462.             and.L         (maskMemPtr)+,d0
  463.             eor.L         d1,d0
  464.             move.L        d0,(destMemPtr)+
  465.       // 10
  466.             move.L        (destMemPtr),d1
  467.             move.L        (sourceMemPtr)+,d0
  468.             eor.L         d1,d0
  469.             and.L         (maskMemPtr)+,d0
  470.             eor.L         d1,d0
  471.             move.L        d0,(destMemPtr)+
  472.       //  9
  473.             move.L        (destMemPtr),d1
  474.             move.L        (sourceMemPtr)+,d0
  475.             eor.L         d1,d0
  476.             and.L         (maskMemPtr)+,d0
  477.             eor.L         d1,d0
  478.             move.L        d0,(destMemPtr)+
  479.       //  8
  480.             move.L        (destMemPtr),d1
  481.             move.L        (sourceMemPtr)+,d0
  482.             eor.L         d1,d0
  483.             and.L         (maskMemPtr)+,d0
  484.             eor.L         d1,d0
  485.             move.L        d0,(destMemPtr)+
  486.       //  7
  487.             move.L        (destMemPtr),d1
  488.             move.L        (sourceMemPtr)+,d0
  489.             eor.L         d1,d0
  490.             and.L         (maskMemPtr)+,d0
  491.             eor.L         d1,d0
  492.             move.L        d0,(destMemPtr)+
  493.       //  6
  494.             move.L        (destMemPtr),d1
  495.             move.L        (sourceMemPtr)+,d0
  496.             eor.L         d1,d0
  497.             and.L         (maskMemPtr)+,d0
  498.             eor.L         d1,d0
  499.             move.L        d0,(destMemPtr)+
  500.       //  5
  501.             move.L        (destMemPtr),d1
  502.             move.L        (sourceMemPtr)+,d0
  503.             eor.L         d1,d0
  504.             and.L         (maskMemPtr)+,d0
  505.             eor.L         d1,d0
  506.             move.L        d0,(destMemPtr)+
  507.       //  4
  508.             move.L        (destMemPtr),d1
  509.             move.L        (sourceMemPtr)+,d0
  510.             eor.L         d1,d0
  511.             and.L         (maskMemPtr)+,d0
  512.             eor.L         d1,d0
  513.             move.L        d0,(destMemPtr)+
  514.       //  3
  515.             move.L        (destMemPtr),d1
  516.             move.L        (sourceMemPtr)+,d0
  517.             eor.L         d1,d0
  518.             and.L         (maskMemPtr)+,d0
  519.             eor.L         d1,d0
  520.             move.L        d0,(destMemPtr)+
  521.      //  2
  522.             move.L        (destMemPtr),d1
  523.             move.L        (sourceMemPtr)+,d0
  524.             eor.L         d1,d0
  525.             and.L         (maskMemPtr)+,d0
  526.             eor.L         d1,d0
  527.             move.L        d0,(destMemPtr)+
  528.       //  1
  529.             move.L        (destMemPtr),d1
  530.             move.L        (sourceMemPtr)+,d0
  531.             eor.L         d1,d0
  532.             and.L         (maskMemPtr)+,d0
  533.             eor.L         d1,d0
  534.             move.L        d0,(destMemPtr)+
  535.  
  536.             subq.L    #1,d2
  537.             bpl        @loop2
  538.         endloop2:
  539.         
  540.         adda.L    sourceRowLongsOffset,sourceMemPtr
  541.         adda.L    sourceRowLongsOffset,maskMemPtr
  542.         adda.L    destRowLongsOffset,destMemPtr
  543.         subq.L    #1,numRowsToCopy
  544.         bne        @loop1
  545.     endloop1:
  546.     }
  547.  
  548.         // restore addressing mode back to what it was
  549.     SwapMMUMode(&mmuMode);
  550.     asm 
  551.     {
  552. @EndBlit:
  553.     }
  554. }
  555.  
  556.  
  557.  
  558. SW_PASCAL void BlitPixieEraseProc(
  559.     FramePtr srcFrameP,
  560.     FramePtr dstFrameP,
  561.     Rect *srcRect,
  562.     Rect *dstRect)
  563. {
  564.     BlitPixie(srcFrameP->framePix.pixMapP, dstFrameP->framePix.pixMapP, srcRect, dstRect, &dstFrameP->frameRect);
  565. }
  566.  
  567. SW_PASCAL void BlitPixieDrawProc(
  568.     FramePtr srcFrameP,
  569.     FramePtr dstFrameP,
  570.     Rect *srcRect,
  571.     Rect *dstRect,
  572.     RgnHandle maskRgn)
  573. {
  574.     ShieldCursor(dstRect, topLeft(qd.thePort->portBits.bounds));
  575.  
  576.     BlitPixie(srcFrameP->framePix.pixMapP, dstFrameP->framePix.pixMapP, srcRect, dstRect, &dstFrameP->frameRect);
  577.  
  578.     ShowCursor();
  579. }
  580.  
  581. SW_PASCAL void BlitPixieMaskDrawProc(
  582.     FramePtr srcFrameP,
  583.     FramePtr dstFrameP,
  584.     Rect *srcRect,
  585.     Rect *dstRect)
  586. {
  587.     BlitPixieMask(srcFrameP->maskPix.pixMapP, srcFrameP->framePix.pixMapP, dstFrameP->framePix.pixMapP, srcRect, dstRect, &dstFrameP->frameRect);
  588. }
  589.  
  590.